package com.example.mall.mapper;

import com.example.mall.pojo.NewSpPermission;
import com.example.mall.pojo.SpPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SpPermissionMapper {

    @Select("select * from sp_permission where ps_pid=#{ps_pid}")
    List<SpPermission> selectByPId(short pid);

//    @Select("select * from sp_permission ")
//    List<SpPermission> selectList();

    @Select("select ps_id as id , ps_name as authName,ps_level as level,ps_pid as pid,ps_c as path from sp_permission ")
    List<NewSpPermission> selectList();

}
